<!-- 优惠分析 -->
<?php $id="form_".uniqid();?>
<table id="<?php echo $id;?>"></table>
<script>
    $("#<?php echo $id;?>").DataSource({url:'useranalyse/get_privilege_analyse_list',
        fields:[
            [
                {field:'t1',title:'会员',align:'center',width:200,sortable:true},
                {field:'t2',title:'层级',align:'center',width:200,sortable:true},
                {field:'t3',title:'彩票',align:'center',width:200,sortable:true},
                {field:'t4',title:'返点小计', align:'center', width:200,  sortable:true}
             ]

       ], tools:[
            {instant:false},
            <?php if(in_array('ADD',$auth)){?>
            {text:"新增层级",iconCls:"icon-add",handler:function(){
                $('#<?php echo $id?>').DataSource('add',{title:'新增层级',get:'level/edituser?>',full:true});
            }},
            <?php }?>
			{type:'datebox', text:'日期', width:100,name:'qaddtime'},
			{type:'datebox', text:'-', width:100,name:'zaddtime'},
			{type:'textbox', text:'会员账号', width:100,name:'member_account'},
			{text:"查询", iconCls:"icon-search", handler:function(){
				$('#<?php echo $id?>').DataSource('search');
			}},
            {type:'label', html:'<span style="color:red;">【查询区间限制为两个月】</span>', width:100},
		'-'
        ],
        checkbox:false,
        edit:true,
        footer:true,
        success:function(){
            $('#<?php echo $id?>').pagination({layout:['links','last'],showRefresh:false});
        }
    });

</script>